Skip to content

fix(cpp-qt-client): add asJsonObject method to OAIEnum class (#19307) #21211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

ReallyVirtual
Copy link
Contributor

Add asJsonObject method to OAIEnum class for cpp-qt-client

Adds the missing method to enum moustache file

@etherealjoy @MartinDelille

@MartinDelille
Copy link
Contributor

Can you explain the need for this new method ? Also, you would need to re-generate the example if you want the PR to be merge.

@ReallyVirtual
Copy link
Contributor Author

@MartinDelille This PR adds the missing asJsonObject method to the Enum class. When generating the schema for enums, the generated client code does not compile with my FastAPI schemas that use enums, as the client is expecting this method.

The issue is also reported by another person here: #19307

I've generated and pushed the examples.

Copy link
Contributor

@MartinDelille MartinDelille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for you for your edit and your explanation. I indeed don't use edit and had trouble using it one time in the past!

@ReallyVirtual ReallyVirtual force-pushed the fix-cpp-qt-enum-asjsonobject branch from 988e125 to 543675d Compare May 8, 2025 08:41
@ReallyVirtual
Copy link
Contributor Author

Thanks for the fix @wing328 - @MartinDelille: the CI checks are passing now, please reapprove if necessary.

@wing328 wing328 added this to the 7.14.0 milestone May 15, 2025
@wing328 wing328 merged commit bd8a206 into OpenAPITools:master May 15, 2025
18 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants